from moviepy.audio.io.AudioFileClip import AudioFileClip
from moviepy.video.io.VideoFileClip import VideoFileClip
# √
# 将音频加入到视频中
video = VideoFileClip('d:\\pdf\\a3.mp4')
audio = AudioFileClip('d:\\pdf\\audio.wav')

if audio.duration>video.duration:
    audio = audio.subclip(0,video.duration)

video = video.set_audio(audio)
video.write_videofile("d:\\pdf\\video.mp4")


